<template>
  <div @click="$router.push({ name: 'infoDetail', query: { id: data.contentId } })" class="out clear_fix">
    <img :src="data.images[0].url" alt="" />
    <div class="info">
      <p class="info-top">{{ data.title }}</p>
      <p class="info-bottom">
        <span>{{ data.source }}</span>
        <span style="float:right">
          <i class="iconfont icon-xiaoyanjing"></i>
          {{ data.viewCount }}
          <i class="iconfont icon-pinglun"></i>
          0
        </span>
      </p>
    </div>
  </div>
</template>

<script>
export default {
  props: ['data'],
};
</script>

<style lang="less" scoped>
.out {
  box-sizing: border-box;
  border-bottom: 1px solid #aaa;
  padding: 0.5rem 0.3rem;
  img {
    width: 2.3rem;
    height: 1.6rem;
    float: left;
  }
  .info {
    float: left;
    margin-left: 0.2rem;
    width: 4rem;
    .info-top {
      word-wrap: break-word;
      font-size: 0.33rem;
      margin: 0.15rem 0;
      display: -webkit-box;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: 2;
      overflow: hidden;
      width: 100%;
      box-sizing: border-box;
    }
    .info-bottom {
      color: #999;
      i {
        vertical-align: middle;
      }
    }
  }
}
</style>
